//懒加载
import Tabbar from '@/components/Tabbar'
const Home = () =>
    import ('@/pages/Home/Home.vue')
const Found = () =>
    import ('@/pages/Found/Found.vue')
const Forum = () =>
    import ('@/pages/Forum/Forum.vue')
const Ranking = () =>
    import ('@/pages/Ranking/Ranking.vue')
const Mine = () =>
    import ('@/pages/Mine/Mine.vue')


const routes = [
    //将组件映射到路由
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        name: "home",
        components: {
            main: Home
        }
    },
    {
        path: '/found',
        name: "found",
        components: {
            main: Found
        }
    },
    {
        path: '/forum',
        name: "forum",
        components: {
            main: Forum
        }
    },
    {
        path: '/ranking',
        name: "ranking",
        components: {
            main: Ranking
        }
    },
    {
        path: '/mine',
        name: "mine",
        components: {
            main: Mine
        }
    }
]

export default routes